@use "sass:math";

@import '../../stylesheets/base';
@import '../../stylesheets/variables';

.scan__dropzone {
  border: 2px dashed lighten($raven, 20%);
  width: 50vw;
  height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;

  p {
    margin-top: 0;
  }
}

.scan__btn {
  @include font-size-xs;
  cursor: pointer;
  margin-top: $global-spacing;
  background: #212121;
  border-radius: 6px;
  border: none;
  padding: $global-spacing $global-spacing * 2;
  display: block;
  transition: background 0.2s;
  color: white;
  letter-spacing: 1px;
  font-weight: $font-weight-bold;
  font-family: $font-family-body;

  &:hover {
    background: $raven;
  }

  & ~ & {
    margin-left: $global-spacing * 1.5;
  }
}

.scan__package-container {
  list-style: none;
  columns: 3;

  @media screen and (max-width: 48em) {
    columns: 2;
  }

  @media screen and (max-width: 40em) {
    columns: 1;
  }
}

.scan__package-item-title {
  opacity: 0.5;
}

.scan__package-item {
  padding: math.div($global-spacing, 2.5);

  input {
    margin-right: $global-spacing;

    &:checked ~ .scan__package-item-title {
      opacity: 1;
    }
  }

  label {
    cursor: pointer;
  }
}

.scan__package-item-version {
  @include font-size-xs;
  font-family: $font-family-code;
  margin-left: $global-spacing;
  color: lighten($raven, 10%);
}

.scan__selection-header {
  display: flex;
  padding: 0 $global-spacing * 2;
  align-items: center;
  margin-bottom: $global-spacing * 2;

  .scan__page-title {
    margin: 0 $global-spacing * 4 0 0;
  }

  .scan__btn {
    @include font-size-xxs;
    text-transform: uppercase;
    padding: $global-spacing $global-spacing * 2;
    border: 2px solid #212121;
    background: white;
    color: #212121;

    &:hover {
      background: #212121;
      color: white;
    }
  }
}
